package com.geek.javase.ch15.work.productionlock;

/*
 *@author wangpeng
 *2025/10/31 20:30
 *@description 消费者
 */
public class Consumer implements Runnable{

    private House house;

    public Consumer(House house) {
        this.house = house;
    }

    @Override
    public void run() {
        for (int i = 0; i < 15; i++) {
            house.sale();
            /*try {
                TimeUnit.MILLISECONDS.sleep(500);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }*/
        }
    }
}